<?php
if (!defined('ipos')) die("Please contact Y!m: ichphien_pro or Email: ichphien_pro@yahoo.com.");
// kiểm tra đăng nhập
$cookie = array();
$cookie['USERID'] 	 = intval(_GETCOOKIE('member_id'));
$cookie['USERPASS']  = _GETCOOKIE('member_pass');
if ($cookie['USERID'] != "" && $cookie['USERPASS'] != "") {
	$arrcookie	=	$db->database("usergroup, username","user","userid = '".$cookie['USERID']."' AND password = '".$cookie['USERPASS']."'");
	if ($arrcookie) {
		$_SESSION["ipos_userid"] 	= $cookie['USERID'];
		$_SESSION["ipos_usergroup"] = $arrcookie[0][0];
		$_SESSION["ipos_username"] 	= $arrcookie[0][1];
	}
}
?>